package com.topisv.tms.repository.stock.instorage;

import java.util.List;

import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;

import com.topisv.tms.entity.stock.instorage.InstorageUpDispatchSubTask;

/**
 * 上架子任务分配_dao
 * @author cc
 *
 */
public interface InstorageUpDispatchSubTaskDao extends PagingAndSortingRepository<InstorageUpDispatchSubTask, Long>, JpaSpecificationExecutor<InstorageUpDispatchSubTask> {

	List<InstorageUpDispatchSubTask> findByTaskCode(String taskCode);
	
	InstorageUpDispatchSubTask findBySubTaskCode(String subTaskCode);
	
	@Modifying
	@Query("delete from InstorageUpDispatchSubTask t where t.subTaskCode = ?")
	void deleteBySubTaskCode(String subTaskCode);
}